package com.iwayin.web.action.notification;

import java.util.List;

import com.iwayin.core.bo.notification.NotificationBO;
import com.iwayin.core.dataobject.NotificationDO;
import com.iwayin.web.action.BaseAction;
import com.iwayin.web.common.AjaxResult;

public class NotificationAction extends BaseAction {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private NotificationDO query;
	private List<NotificationDO> notifications;
	private AjaxResult ajaxResult;

	private NotificationBO notificationBO;

	public String findNotificationByUserId() {
		// try {
		notifications = this.notificationBO.findNotificationByUserId(query);
		// ajaxResult = AjaxResult.succResultAndInitMap();
		// ajaxResult.getResultMap().put("notifications", notifications);
		// } catch (Exception e) {
		// ajaxResult = AjaxResult.errorResult(e.getMessage());
		// }
		return SUCCESS;
	}

	public NotificationDO getQuery() {
		return query;
	}

	public AjaxResult getAjaxResult() {
		return ajaxResult;
	}

	public void setQuery(NotificationDO query) {
		this.query = query;
	}

	public void setNotificationBO(NotificationBO notificationBO) {
		this.notificationBO = notificationBO;
	}

	public List<NotificationDO> getNotifications() {
		return notifications;
	}

}
